// 选择题的答案选项
import icon from '@/assets/images/user/choice_me.png'
interface IProp {
    data: AnserData;
    answers: string[];
    onChange: (value: string) => void;
}
export default function OptionAnsers({ data, answers, onChange }: IProp) {
    return <div className="answer-item" onClick={() => onChange(data.key)}>
        <div className="check">
            <img style={{ display: answers.includes(data.key) ? 'block' : 'none' }} src={icon} alt="" />
        </div>
        <div className="sort">{data.key}、</div>
        <div className="content">{data.value}</div>
    </div>
}